package custom;


public class MainTest {
    public static int a=1;
    public static void main(String[] args) {
        Promise promise = new Promise((resolve, reject)->{
            new Thread(()->{
                int k=a*10;
                try {
                    Thread.sleep(5000);
                } catch (InterruptedException e) {
                    e.printStackTrace();
                }
                resolve.accept(k);
            }).start();
        }).then((e)->{System.out.println(e);return null;},null);

    }
}
